﻿using System;

using Microsoft.EntityFrameworkCore;

using Xc.DataAccess.Core;

namespace Xc.Views.Core
{
    public interface IApplicationBooster<TAppSetting, TApplicationDbContext> : IApplicationBooster<TAppSetting> where TAppSetting : class where TApplicationDbContext: DbContext
    {
        /// <summary>
        /// 创建数据库
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        TApplicationDbContext CreateDbContext(string[] args);

    }
    public interface IApplicationBooster<TAppSetting> : IStartupBase where TAppSetting : class 
    {
        /// <summary>
        /// 获取主UI元素
        /// </summary>
        /// <typeparam name="TUiElement"></typeparam>
        /// <returns></returns>
        TUiElement GetMainElement<TUiElement>();

        /// <summary>
        /// 更新设置文件
        /// </summary>
        /// <param name="appSetting"></param>
        /// <returns></returns>
        Result UpdateAppSettingFile(TAppSetting appSetting);
    }
}
